import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swstonewaystatistics/page',
    method: 'get',
    params: query
  })
}

export function getDetailObj(date) {
  return request({
    url: '/stm/swstonewaystatistics/page/detail/' + date,
    method: 'get'
  })
}

export function exportExcel(query) {
  return request({
    url: '/stm/swstonewaystatistics/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

export function updateDetail(obj) {
  return request({
    url: '/stm/swstonewaystatistics/updateDetail',
    method: 'put',
    data: obj
  })
}

export function calcOneWayStatistics(query) {
  return request({
    url: '/stm/swstonewaystatistics/calcOneWayStatistics',
    method: 'post',
    params: query
  })
}
